package com.young.springdemo.service.component;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.List;

@Component
public class testComponent {

//    @PostConstruct
    public void testConent(){
        com.young.springdemo.service.component.Component txtFolder,imageFolder,videoFolder,
                txt1,txt2,txt3,image1,image2,image3,viedo1,young;
        young = new Folder("我的电脑");
        txtFolder = new Folder("我的作文集");
        imageFolder = new Folder("我的图片集");
        videoFolder = new Folder("我的视频集");

        txt1 = new TxtFile("我的老师");
        txt2 = new TxtFile("我的暑假");
        txt3 = new TxtFile("我和我的祖国");

        image1 = new ImageFile("春天");
        image2 = new ImageFile("夏天");
        image3 = new ImageFile("秋天");

        viedo1 = new VideoFile("我的摄像展");

        txtFolder.add(txt1);
        txtFolder.add(txt2);
        txtFolder.add(txt3);

        videoFolder.add(viedo1);

        imageFolder.add(image1);
        imageFolder.add(image2);
        imageFolder.add(image3);

        young.add(imageFolder);
        young.add(videoFolder);
        young.add(txtFolder);

        txtFolder.killVirus();
    }
}
